package com.allwees.bs.core.model.merchant.entity;

import com.allwees.bs.core.modelbase.entity.WfBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * 商户基类。商户包括Retailer（零售商），Supplier（供应商）
 *
 * @author yangylsky
 * @since 2019-12-11
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@MappedSuperclass
public abstract class MerchantModel extends WfBaseEntity {

	@Column(nullable = false)
	protected Long deptId;

	@Column(updatable = false, length = 48)
	protected String no;

	/** 邮箱 **/
	@Column(length = 48)
	protected String email;

	// 头像图片地址、原图
	protected String avatar;

	// 国际电话区号
	@Column(length = 12)
	protected String itu;

	// 手机号
	@Column(length = 16)
	protected String phone;

	// 语言
	@Column(length = 8)
	protected String language;

	// 邮编
	@Column(length = 10)
	protected String zipCode;

	/** 店铺名称 **/
	private String storeName;

	/** 公司名称 **/
	private String companyName;

	/** 公司统一社会信用码 **/
	private String uniformSocialCreditCode;

	/** 营业执照 **/
	private String businessLicenseImg;

	private String firstName;

	private String lastName;

	private String workCountry;

	private String workProvince;

	private String workCity;

	@Column(columnDefinition = " text")
	private String workAddress;

	/** 法人名称 **/
	@Column(length = 48)
	private String legalPersonName;

	@Column(length = 48)
	private String legalPersonIdCardNo;

	// 结算币种
	@Column(length = 4)
	protected String currency;

	// 否通过身份认证:0 no,1 yes
	protected Integer identityVerified;

	// 是否验证了邮箱:0 no,1 yes
	protected Integer emailVerified;

	// 是否验证了手机号:0 no,1 yes
	protected Integer phoneVerified;

	// 上次登录时间
	protected Date latestLoginAt;
}
